<template>
  <div></div>
</template>

<script>
export default {
  name: '',
  props: {},
  data() {
    return {}
  },

  components: {},

  computed: {},

  beforeMount() {},

  mounted() {
  },

  methods: {
    xx() {

      var startDate = ''
            var endDate = ''
            if (this.form.date1 !== '') {
              startDate = dayjs(this.form.date1).format('YYYY-MM-DD')
            }
            if (this.form.date2 !== '') {
              endDate = dayjs(this.form.date2).format('YYYY-MM-DD')
            }
            console.log(startDate, endDate)

            var filter = startDate ? 'withdrawal_time_gte=' + startDate : ''
            if (filter === '') {
              filter += endDate ? 'withdrawal_time_lte=' + endDate : ''
            } else {
              filter += endDate ? '&withdrawal_time_lte=' + endDate : ''
            }

            const { data: res } = await this.$http.get(`/cashManagements?${filter}`)
            res.forEach(item => {
              if (!this.tableData.find(subitem => subitem.id === item.id)) {
                this.tableData.push(item)
              }
            })

          }
  },

  watch: {}
}
</script>
<style lang='less' scoped>
</style>
